﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace UFIDA.U9.Cust.Pub.SelectDateUIModel
{
	[Serializable]
	public partial class SelectDateUIModelModel : UIModel
	{
		#region Constructor
		public SelectDateUIModelModel() : base("SelectDateUIModel")
		{
			InitClass();
			this.SetResourceInfo("7f05d899-cfa2-4a15-a132-c7de4c4a9957");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private SelectDateUIModelModel(bool isInit) : base("SelectDateUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new SelectDateUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private DateViewView viewDateView;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public DateViewView DateView
		{
			get { return (DateViewView)this["DateView"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewDateView = new DateViewView(this);
			this.viewDateView.SetResourceInfo("3ea95200-f904-4e22-b9eb-de54ee20cf57");
			this.Views.Add(this.viewDateView);			

			
		}

		public override string AssemblyName
		{
			get { return "UFIDA.U9.Cust.Pub.WSLogUI"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class DateViewView : UIView
	{
		#region Constructor
		public DateViewView(IUIModel model) : base(model,"DateView","", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private DateViewView():base(null,"DateView","", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new DateViewView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}
		public IUIField FieldCreatedOn
		{
			get { return this.Fields["CreatedOn"]; }
		}
		public IUIField FieldCreatedBy
		{
			get { return this.Fields["CreatedBy"]; }
		}
		public IUIField FieldModifiedOn
		{
			get { return this.Fields["ModifiedOn"]; }
		}
		public IUIField FieldModifiedBy
		{
			get { return this.Fields["ModifiedBy"]; }
		}
		public IUIField FieldSysVersion
		{
			get { return this.Fields["SysVersion"]; }
		}
		public IUIField FieldDate
		{
			get { return this.Fields["Date"]; }
		}


		[Obsolete("请使用CurrentFilter属性，这个方法有可能会导致强弱类型转换出错")]
		public DateViewDefaultFilterFilter DefaultFilter
		{
			get { return (DateViewDefaultFilterFilter)this.CurrentFilter; }
		}
		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","0a2bffa6-5aba-4a5a-91fe-30584899d44f");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","7419866c-50b3-4c22-81a6-99d2d2e23f36");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","3a34e75a-1162-493b-82d2-4355488adfd3");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","53b84b04-ab07-484f-ac44-3cfd49e6cf3e");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","d849c66b-7343-4b69-9b1f-e929c02748ad");
			UIModelRuntimeFactory.AddNewUIField(this,"SysVersion", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","64d5f815-2283-4971-8921-1a4d17ec8597");
			UIModelRuntimeFactory.AddNewUIField(this,"Date", typeof(DateTime), false,"2005-1-1","System.Date", "", false,false, false, "",false,(UIFieldType)1,"c9e6bc50-2e39-4f27-9519-da0c7859d37e","3c565a54-4265-4f85-8058-bd3334589687");


			this.CurrentFilter = new DateViewDefaultFilterFilter(this);
		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new DateViewRecord(builder);
		}
		#endregion

		#region new method
		public new DateViewRecord FocusedRecord
		{
			get { return (DateViewRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new DateViewRecord AddNewUIRecord()
		{	
			return (DateViewRecord)base.AddNewUIRecord();
		}
		public new DateViewRecord NewUIRecord()
		{	
			return (DateViewRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class DateViewRecord : UIRecord
	{
		#region Constructor
		public DateViewRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private DateViewView uiviewDateView
		{
			get { return (DateViewView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new DateViewRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewDateView.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewDateView.FieldID);
			}
			set{
				this[this.uiviewDateView.FieldID] = value;
			}
		}
		
		
		public  DateTime CreatedOn
		{
			get{
				//object value = this[this.uiviewDateView.FieldCreatedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewDateView.FieldCreatedOn);
			}
			set{
				this[this.uiviewDateView.FieldCreatedOn] = value;
			}
		}
		
		
		public  String CreatedBy
		{
			get{
				//object value = this[this.uiviewDateView.FieldCreatedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewDateView.FieldCreatedBy);
			}
			set{
				this[this.uiviewDateView.FieldCreatedBy] = value;
			}
		}
		
		
		public  DateTime ModifiedOn
		{
			get{
				//object value = this[this.uiviewDateView.FieldModifiedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewDateView.FieldModifiedOn);
			}
			set{
				this[this.uiviewDateView.FieldModifiedOn] = value;
			}
		}
		
		
		public  String ModifiedBy
		{
			get{
				//object value = this[this.uiviewDateView.FieldModifiedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewDateView.FieldModifiedBy);
			}
			set{
				this[this.uiviewDateView.FieldModifiedBy] = value;
			}
		}
		
		
		public new Int64 SysVersion
		{
			get{
				//object value = this[this.uiviewDateView.FieldSysVersion] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewDateView.FieldSysVersion);
			}
			set{
				this[this.uiviewDateView.FieldSysVersion] = value;
			}
		}
		
		
		public  DateTime Date
		{
			get{
				//object value = this[this.uiviewDateView.FieldDate] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewDateView.FieldDate);
			}
			set{
				this[this.uiviewDateView.FieldDate] = value;
			}
		}
		#endregion
	}
	
	[Serializable]
	public class DateViewDefaultFilterFilter : UIFilter
	{
		#region Constructor
		public DateViewDefaultFilterFilter(IUIView view) 
			: base("DefaultFilter",view,@"",@"")
		{
			InitClass();
		}
		//for Clone Constructor
		private DateViewDefaultFilterFilter()
			: base("DefaultFilter",null,"","")
		{}
		protected override IUIFilter CreateCloneInstance()
		{
			return new DateViewDefaultFilterFilter();
		}
		#endregion

		#region property
		#endregion
		
		#region function
		private void InitClass()
		{
		}
		#endregion

	}



}